#pragma once

#define IDENTIFY_ITEM      0
#define REMOVE_LIMIT_WORD  1
#define REMOVE_SIGHT_LIMIT 2
#define CUSTOM_MAPS        3
#define USE_ITEM_DETAIL    4
#define ITEM_ENLARGE       5

class DataPatcher
{
public:
	DataPatcher(void);
	~DataPatcher(void);

	BOOL identifyItem;
	BOOL removeLimitWord;
	BOOL removeSightLimit;
	BOOL customMaps;
	BOOL useItemDetail;
	BOOL itemEnlarge;

	void Patch(int patchItem);
	void Save();
	BOOL WriteXml();

private:
	LPTSTR iniPath;

	int ExtractFileFromGrf(LPCTSTR grfName, LPCTSTR grfFileName, LPCTSTR fileName);
	void BatchExtractFilesFromGrf(LPCTSTR grfName, int fileCount, ... );
	void ExtractDirectory(LPCTSTR grfName, LPCTSTR grfDirectory);
	void MakeItemSlot();
};
